<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
    <head th:replace="~{commons/common::head('西安旅游')}">
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

        <!-- Bootstrap CSS -->
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/css/bootstrap.min.css"/>
        <!-- 图标 -->
        <link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/font-awesome/5.13.0/css/all.css">
        <link rel="stylesheet" th:href="@{/css/common.css}" href="../static/css/common.css">
        <title>西安旅游</title>
    </head>
    <body>
        <!-- 顶部 -->
        <div th:replace="~{commons/common::navbar(1)}" class="header bg-white mb-3 shadow-sm"></div>

        <!-- 内容 -->
        <div class="main">
            <!-- 轮播图 -->
            <div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
                <ol class="carousel-indicators">
                    <li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
                    <li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
                    <li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
                </ol>
                <div class="carousel-inner">
                    <div class="carousel-item active">
                        <img th:src="@{/img/banner01.jpg}" src="../static/img/banner01.jpg" class="d-block w-100"
                             style="width: 100%" height="600">
                    </div>
                    <div class="carousel-item">
                        <img th:src="@{/img/banner02.jpg}" src="../static/img/banner01.jpg" class="d-block w-100"
                             style="width: 100%" height="600">
                    </div>
                    <div class="carousel-item">
                        <img th:src="@{/img/banner03.jpg}" src="../static/img/banner01.jpg" class="d-block w-100"
                             style="width: 100%" height="600">
                    </div>
                </div>
                <a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
                    <span class="carousel-control-prev-icon" aria-hidden="true"></span>
                    <span class="sr-only">Previous</span>
                </a>
                <a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
                    <span class="carousel-control-next-icon" aria-hidden="true"></span>
                    <span class="sr-only">Next</span>
                </a>
            </div>
            <!-- 内容 -->
            <div class="container">
                <div class="mt-3">
                    <h3 class="my-3"><i class=""></i><span>热门景点</span></h3>
                    <div th:each="site, siteStat : ${siteList}" class="card d-inline-block mx-2"
                         style="width: 16rem;">
                        <img th:src="@{${site.siteImg}}" src="../static/img/banner01.jpg" height="150px"
                             class="card-img-top" alt="">
                        <div class="card-body">
                            <h5 class="card-title" th:text="${site.siteName}">大唐不夜城</h5>
                            <p class="card-text" th:text="${#strings.abbreviate(site.siteInfo, 40)}">
                                西安的超级美丽的景点之一，西安的超级美丽的景点之一，西安的超级美丽的景点之一.
                            </p>
                            <a href="#" th:href="@{/site/detail/{site_id}(site_id=${site.siteId})}"
                               class="btn btn-primary">去查看</a>
                        </div>
                    </div>
                </div>
                <div class="mt-3">
                    <h3 class="my-3"><i class=""></i><span>旅游景点</span></h3>
                    <div class="list-group">
                        <a href="#" th:each="site, siteStat : ${siteList}"
                           th:href="@{/site/detail/{site_id}(site_id=${site.siteId})}"
                           class="list-group-item list-group-item-action p-4">
                            <div class="row">
                                <div>
                                    <img th:src="@{${site.siteImg}}" src="../static/img/im_bg.jpg" width="200px">
                                </div>
                                <div class="col ml-5">
                                    <h5 th:text="${site.siteName}">华山</h5>
                                    <span th:text="${#strings.abbreviate(site.siteInfo, 150)}" class="text-muted">
                                            华山，古称“西岳”，雅称“太华山”，为五岳之一，位于陕西省渭南市华阴市，在省会西安以东120千米处。南接秦岭，北瞰黄渭，自古以来就有“奇险天下第一山”的说法。 中华之“华”源于华山，由此，华山有了“华夏之根”之称 。华山是道教主流全真派圣地，为“第四洞天”，也是中国民间广泛崇奉的神祇，即西岳华山君
                                        </span>
                                    <button class=" btn btn-link text-decoration-none float-right mt-2 mr-2">
                                        <i class="fas fa-chevron-right"></i> 详情
                                    </button>
                                </div>
                            </div>
                        </a>
                    </div>
                </div>
            </div>
        </div>

        <!-- 底部 -->
        <footer th:replace="~{commons/common::footer}" class="navbar-fixed-bottom mt-5 text-muted small"></footer>

        <th:block th:replace="~{commons/common::commonJs}"/>
        <script src='https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.min.js'></script>
        <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script>
        <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/js/bootstrap.min.js"></script>
        <script th:src="@{/js/bootstrapQ.js}" src='../static/js/bootstrapQ.js'></script>
        <script th:inline="javascript">

        </script>
    </body>
</html>